Skip to content

Conversation

@silvestre
Copy link
Member

Potential fix for https://github.com/cloudfoundry/app-autoscaler-release/security/code-scanning/422

To fix the issue, we need to ensure that sensitive information, such as the Password field, is not logged in clear text. The best approach is to exclude the Password field from the log entirely or replace it with a placeholder (e.g., "***"). This ensures that sensitive data is not exposed in the logs while still allowing other non-sensitive information to be logged for debugging purposes.

Specifically:

  1. Modify the logging statement on line 126 in src/autoscaler/db/sqldb/storedprocedure_sqldb.go to exclude the Password field from the creds object.
  2. Create a sanitized version of the creds object that omits or masks the Password field before passing it to the logger.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

…sensitive information

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant